#include "eveCommon.h"
#include "eveTexture.h"
#include "eveD3D9RenderSystem.h"
#include "eveTextureManager.h"

Texture::Texture(uint16 width, uint16 height, DWORD usage, DWORD format, DWORD pool)
: m_pD3DTexture(NULL)
{
	CreateD3DTexture(width,height,usage,format,pool);
}


Texture::~Texture()
{
	ReleaseD3DTexture();
}

void Texture::ReleaseD3DTexture()
{
	SAFE_RELEASE(m_pD3DTexture);
}
void Texture::CreateD3DTexture(uint16 width,uint16 height,DWORD usage,DWORD format,DWORD pool)
{
	m_pD3DTexture = RenderSystem::GetSingleton()->CreateTexture(width,height,
		usage,format,pool);
}